.subscribe-modal {
  .ant-modal-content {
    height: var(--screen-height);
    border-radius: 0;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;

    background: linear-gradient(
        124deg,
        rgba(31, 201, 150, 0.1) 0%,
        rgba(69, 190, 255, 0.06) 24.85%
      ),
      var(--bg---refly-bg-body-z0, #fff);
    .ant-modal-body {
      width: 100%;
      max-height: var(--screen-height);
      overflow-y: auto;
    }
    .ant-modal-close {
      top: 20px;
      right: 20px;
      color: var(--text-icon-refly-text-2, #6b7280);

      &:hover {
        color: var(--refly-text-0, #111827);
      }
    }
  }
}

.subscribe-content {
  max-width: 1200px;
  margin: 0 auto;

  &-type {
    margin-top: 24px;
    display: flex;
    justify-content: center;

    &-inner {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 36px;
      padding: 4px;
      box-sizing: border-box;
      border-radius: 18px;
      background-color: var(--bg-refly-bg-subtle, #f3f4f6);

      &-item {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 100px;
        height: 100%;
        border-radius: 18px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        padding: 0 16px;
        color: var(
          --text-icon-refly-text-2,
          #6b7280
        ); // Softer text color for inactive item
        transition: all 0.3s ease;

        .ant-tag {
          color: var(--functional-refly-functional-orange-6-default, #fa8c16);
          background: var(
            --functional-refly-functional-orange-1-light,
            #fff7e6
          );
          border-color: var(
            --functional-refly-functional-orange-3-light,
            #ffd591
          );
          border-radius: 4px;
          margin-left: 8px;
        }

        &.active {
          color: var(
            --refly-text-0,
            #111827
          ); // Dark text for active item
          background: var(
            --bg-refly-bg-container,
            #fff
          ); // White background for active item
          box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); // Subtle shadow for depth
        }
      }
    }
  }

  &-plans {
    margin-top: 32px;
    padding: 12px;
    justify-content: center;
    border-radius: 12px;

    .pro-plan {
      border-radius: 12px;
      // Apply border to the outer container to wrap the 'Most Popular' tag
      border: 2px solid var(--primary---refly-primary-default, #0e9f77);
      // Update box-shadow to match the new design
      box-shadow: 0px 4px 12px 0px rgba(14, 159, 119, 0.2);

      // The inner item should not have its own border
      .subscribe-content-plans-item {
        border: none;
      }
    }

    &-item {
      flex: 1;
      border-radius: 10px;
      padding: 24px;
      box-sizing: border-box;
      border: 0.5px solid #e5e5e5;
      background-color: #fff;
      display: flex;
      flex-direction: column;
      height: 100%;

      &-title {
        font-size: 18px;
        font-weight: 600;
        color: #111827;
        display: flex;
        align-items: center;
        gap: 8px;
      }

      .description {
        margin-top: 4px;
        font-size: 14px;
        color: #6b7280;
        height: auto;
        min-height: 20px; // Ensure consistent height

        &.description-en {
          height: 60px;
          line-height: 20px;
          overflow: hidden;
          display: -webkit-box;
          -webkit-line-clamp: 3;
          line-clamp: 3;
          -webkit-box-orient: vertical;
        }
      }

      .price-section {
        margin-top: 16px;
        display: flex;
        align-items: center;

        color: var(--refly-text-0, #1c1f23);

        /* 超大标题 */
        font-family: "PingFang SC";
        font-size: 22px;
        font-style: normal;
        font-weight: 600;
        line-height: 32px; /* 145.455% */

        .yearly-price-container {
          display: flex;
          flex-direction: column;
          align-items: flex-start;
          .price-monthly {
            font-size: 24px;
            line-height: 1.2;
          }
          .price-yearly {
            font-size: 12px;
            font-weight: 400;
            color: #6b7280;

            color: var(--refly-text-0, #1c1f23);

            /* 辅助文本-12-bold */
            font-family: "PingFang SC";
            font-size: 12px;
            font-style: normal;
            font-weight: 600;
            line-height: 16px; /* 133.333% */
            margin-top: 4px;
          }
        }
      }

      .subscribe-btn {
        margin: 24px 0;
        height: 40px;
        width: 100%;
        font-size: 14px;
        font-weight: 600;
        border-radius: 8px;
        transition: all 0.3s ease;

        display: flex;
        height: var(--height-button_default, 32px);
        padding: var(--spacing-button_default-paddingTop, 6px)
          var(--spacing-button_default-paddingRight, 12px)
          var(--spacing-button_default-paddingTop, 6px)
          var(--spacing-button_default-paddingLeft, 12px);
        justify-content: center;
        align-items: center;
        align-self: stretch;

        background-color: var(--refly-bg-control-z0);
        border: 1px solid var(--refly-Card-Border);
        color: var(--primary---refly-primary-default, #0e9f77);
        font-family: "PingFang SC";
        font-size: 14px;
        font-style: normal;
        font-weight: 600;
        line-height: 20px;

        &--upgrade {
          border-radius: 8px;
          border: 0px solid
            var(--border---refly-Card-Border, rgba(0, 0, 0, 0.1));
          background: var(--primary---refly-primary-default, #0e9f77);
          color: var(--fill---refly-fill-StaticWhite, #fff);

          font-family: "PingFang SC";
          font-size: 14px;
          font-style: normal;
          font-weight: 600;
          line-height: 20px;
        }

        &--disabled {
          cursor: not-allowed;
          opacity: 0.6;
          &:hover {
            background-color: var(--refly-bg-control-z0) !important;
            border-color: var(--refly-Card-Border) !important;
            color: var(--primary---refly-primary-default, #0e9f77) !important;
          }
        }

        &--loading {
          cursor: not-allowed;
          opacity: 0.8;
          &:hover {
            background-color: inherit !important;
            border-color: inherit !important;
            color: inherit !important;
          }
        }

        &:disabled {
          background-color: var(--refly-bg-control-z0);
          color: #9ca3af;
          border-color: #d1d5db;
        }

        &:hover:not(:disabled) {
          background: var(--primary---refly-primary-hover, #1b9774);
          border-color: var(--primary---refly-primary-hover);
          color: var(--fill---refly-fill-StaticWhite, #fff);
        }
      }

      .plane-features {
        flex-grow: 1;

        &-item {
          display: flex;
          align-items: flex-start;
          gap: 8px;
          margin-bottom: 16px;
          font-size: 14px;
          color: #374151;

          .anticon-check,
          .anticon-hourglass {
            color: #0E9F77;
            margin-top: 3px; // Adjust for vertical alignment
          }

          .plane-features-item-text {
            display: flex;
            flex-direction: column;
            line-height: 1.4; // Improve readability

            .feature-name {
              color: var(--text-icon-refly-text-1, rgba(28, 31, 35, 0.8));

              font-size: 12px;
              font-weight: 400;
              line-height: 16px;
              margin-bottom: 4px;
            }

            .feature-description {
              color: var(--refly-text-0, #1c1f23);

              font-size: 14px;
              font-weight: 600;
              line-height: 20px;
            }
          }

          &:last-child {
            margin-bottom: 0;
          }
        }
      }
    }
  }

  &-description {
    text-align: center;
    margin-top: 32px;
    font-size: 12px;
    color: #9ca3af;
    a {
      color: #6b7280;
      text-decoration: underline;
      &:hover {
        color: #111827;
      }
    }
  }

  .credit-packs-section {
    margin-top: 48px;

    .credit-packs-title {
      text-align: center;
      font-size: 24px;
      font-weight: 600;
      color: #111827;
      margin-bottom: 24px;
    }

    .credit-packs-grid {
      padding: 12px;
      justify-content: center;
      border-radius: 12px;

      .item-credit-pack {
        border: 0.5px solid #e5e5e5;
        background-color: #fff;
        border-radius: 10px;
        padding: 24px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        height: 100%;

        .credit-pack-title {
          font-size: 18px;
          font-weight: 600;
          color: #111827;
          text-align: center;
          margin-bottom: 8px;
        }

        .description {
          margin-top: 4px;
          font-size: 14px;
          color: #6b7280;
          text-align: center;
          min-height: 40px;
          display: flex;
          align-items: center;
          justify-content: center;
        }

        .credit-pack-credits {
          margin-top: 16px;
          font-size: 16px;
          font-weight: 500;
          color: #111827;
          text-align: center;
          padding: 8px 0;
          background-color: #f9fafb;
          border-radius: 6px;
        }

        .credit-pack-price {
          margin-top: 16px;
          font-size: 24px;
          font-weight: 600;
          color: #111827;
          text-align: center;
          line-height: 1.2;
        }

        .credit-pack-btn {
          margin: 24px 0;
          height: 40px;
          width: 100%;
          font-size: 14px;
          font-weight: 600;
          border-radius: 8px;
          transition: all 0.3s ease;
          background-color: var(--primary---refly-primary-default, #0e9f77);
          border: 1px solid var(--primary---refly-primary-default, #0e9f77);
          color: #fff;
          cursor: pointer;
          display: flex;
          align-items: center;
          justify-content: center;

          &:hover:not(:disabled) {
            background-color: var(--primary---refly-primary-hover, #1b9774);
            border-color: var(--primary---refly-primary-hover, #1b9774);
          }

          &--loading {
            cursor: not-allowed;
            opacity: 0.8;
            &:hover {
              background-color: inherit !important;
              border-color: inherit !important;
              color: inherit !important;
            }
          }
        }
      }
    }
  }
}
